package com.yida.system.domain.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.*;
import java.math.BigDecimal;

/**
 * @Description 系统黑名单配置修改参数
 * @Author wws
 * @Date 2023-03-22
 */
@ApiModel("系统黑名单配置修改参数")
public class SysBlackConfigEditRequest {


    @ApiModelProperty("主键")
    @NotNull(message = "主键不能为空")
    private Long id;

    @ApiModelProperty("访问次数")
    @NotNull(message = "访问次数不能为空")
    @Min(value = 1, message = "访问次数不得小于1")
    @Max(value = Integer.MAX_VALUE, message = "访问次数不得超过Integer最大值")
    private Integer visits;

    @ApiModelProperty("访问时间间隔（秒）")
    @Min(value = 1, message = "访问时间间隔不得小于1")
    @Max(value = Integer.MAX_VALUE, message = "访问时间间隔不得超过Integer最大值")
    private Integer visitInterval;

    @ApiModelProperty("锁定时长（分钟）")
    @NotNull(message = "锁定时长不能为空")
    @Digits(integer = 9, fraction = 2, message = "锁定时长格式不正确")
    @DecimalMax(value = "99999999.99", message = "锁定时长不得超过99999999.99")
    @DecimalMin(value = "0.01", message = "锁定时长不得小于0.01")
    private BigDecimal lockTime;

    @ApiModelProperty("状态（0：关闭；1：启用）")
    @NotBlank(message = "启用状态不得为空")
    private String status;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getVisits() {
        return visits;
    }

    public void setVisits(Integer visits) {
        this.visits = visits;
    }

    public Integer getVisitInterval() {
        return visitInterval;
    }

    public void setVisitInterval(Integer visitInterval) {
        this.visitInterval = visitInterval;
    }

    public BigDecimal getLockTime() {
        return lockTime;
    }

    public void setLockTime(BigDecimal lockTime) {
        this.lockTime = lockTime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("SysBlackListConfigEditRequest{");
        sb.append("id=").append(id);
        sb.append(", visits=").append(visits);
        sb.append(", visitInterval=").append(visitInterval);
        sb.append(", lockTime=").append(lockTime);
        sb.append(", status='").append(status).append('\'');
        sb.append('}');
        return sb.toString();
    }
}
